﻿<html>
<body>
    <title>驰骋工作流引擎设计器</title>
    <style type="text/css">
    html, body {
	    height: 100%;
	    width : 100%;
	    overflow:hidden;
    }
    body {
	    padding: 0;
	    margin: 0;
    }
    #silverlightControlHost {
	    height: 100%;
	    width: 100%;
	    text-align:center; 
    }

   </style>

    <script type="text/javascript">
        function maximizeWindow() {
            window.moveTo(0, 0)
            window.resizeTo(screen.width, window.screen.availHeight)
        }
        function GetBrowserWidth() {
            return window.screen.width;
        }
        function GetBrowserHeight() {
            return window.screen.height;
        }

        function onSilverlightError(sender, args) {
            var appSource = "";
            if (sender != null && sender != 0) {
                appSource = sender.getHost().Source;
            }

            var errorType = args.ErrorType;
            var iErrorCode = args.ErrorCode;

            if (errorType == "ImageError" || errorType == "MediaError") {
                return;
            }

            var errMsg = "Silverlight 应用程序中未处理的错误 " + appSource + "\n";

            errMsg += "代码: " + iErrorCode + "    \n";
            errMsg += "类别: " + errorType + "       \n";
            errMsg += "消息: " + args.ErrorMessage + "     \n";

            if (errorType == "ParserError") {
                errMsg += "文件: " + args.xamlFile + "     \n";
                errMsg += "行: " + args.lineNumber + "     \n";
                errMsg += "位置: " + args.charPosition + "     \n";
            }
            else if (errorType == "RuntimeError") {
                if (args.lineNumber != 0) {
                    errMsg += "行: " + args.lineNumber + "     \n";
                    errMsg += "位置: " + args.charPosition + "     \n";
                }
                errMsg += "方法名称: " + args.methodName + "     \n";
            }
            alert(errMsg);
        }


        
</script>

 <script type="text/javascript" language="javascript" >
     //页面启动函数.
     $(function () {

         $("#Msg").html("<img src=../../Img/loading.gif />&nbsp;正在加载,请稍后......");

         //初始化groupID.
         var nodeID = GetQueryString("FK_Node");

         //调用公共类库的方法.
         GenerBindEnumKey("DDL_TWay", "TWay", "1");

         $.ajax({
             type: 'post',
             async: true,
             url: Handler + "?DoType=CHRole_Init&FK_Node=" + nodeID + "&m=" + Math.random(),
             dataType: 'html',
             success: function (data) {

                 if (data.indexOf('err@') == 0) {
                     alert(data);
                     return;
                 }

                 data = JSON.parse(data);

                 //调用公共类库的方法:执行批量主表赋值
                 GenerFullAllCtrlsVal(data);
             }
         });
     });
    </script>

</head>
<body onload="javascript:maximizeWindow()">
    <form id="form1" runat="server" style="height:100%">
    <div id="silverlightControlHost">
		<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
			<param name="source" value="../ClientBin/CCFormDesigner.xap"/>
			<param name="onerror" value="onSilverlightError" />
			<param name="background" value="white" />
			<param name="minRuntimeVersion" value="2.0.31005.0" />
            <param name="initParams" value="platForm=.NET,appName=" />
			<param name="autoUpgrade" value="false" />

			<a href="<%= %>" > 下载微软的插件Silverlight 
     			<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="下载微软的插件Silverlight" style="border-style: none"/>
			</a>
		</object>
    </div>
  
    <iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe>
    </form>
</body>
</html>

